# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-libregf-python
pkgname=('python2-libregf-python' 'python-libregf-python')
_pkgname=libregf-python
pkgver=20240421
pkgrel=2
pkgdesc='Python bindings module for libregf.'
arch=('x86_64' 'aarch64')
url='https://pypi.python.org/pypi/libregf-python/'
license=('LGPL3')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('2b126b530cd4735923a837d57f61f93132281fcbc7db1fd44f9b168a4f4863f8b4f9ca90d445515cab60815d4b94a92676b4dbd83b0b57223c502f9f411ae635')

package_python2-libregf-python() {
  depends=('python2')

  cd "libregf-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}

package_python-libregf-python() {
  depends=('python')

  cd "libregf-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}

